home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacWorld 1998 May
/
Macworld (1998-05).dmg
/
Shareware World
/
Comms & Internet
/
USRARA
/
U.S. Robotics High Speed
/
U.S. Robotics High Speed
next >
Wrap
Text File
|
1998-03-03
|
13KB
|
663 lines
! U.S. Robotics High Speed Script for all products (hopefully)
! Finalized 3/3/98
! Author: PCD Applications Engineering
! Loosely based on a Modem Script Generator file
!
! PCD address:
!
! 3Com
! 7770 N. Frontage Rd.
! Skokie, IL 60077
!
! Corporate Systems Courier, Shared Access, Total Control) Support:
! Phone: (800) 550-7800 (Courier only)
! Phone: (800) 231-8770 (Total Control and Allegra)
! Fax: (847) 222-0823
!
! Personal Communications (Sportster) Support:
! Phone: (847) 982-5151
! Fax: (847) 676-7314
!
! General Support Sites:
! BBS: (847) 982-5092
! Mac BBS: (847) 676-1598
! FIDO: 1:115/500
! RIME: USRUSA #174
! PRIME: 98:212/1
! Compuserve Forum: GO USROBOTICS
! Compuserve Mail: 76711,707
! AOL Forum: Keyword "USROBOTICS"
! Fax On Demand Domestic: (800) 762-6163
! Internet Support: support@usr.com (gets a list of documents)
! FTP Site: ftp.usr.com
! Main WWW Site: http://www.3com.com
! WWW site for Corporate Systems: http://totalservice.usr.com
!
! International Information:
! BBS: (+33) 20 05 32 41
! Fax: (+33) 20 05 32 40
! Phone: (+33) 20 19 19 59 available M-F 9:00am-12:30pm, 1:30pm-6:00pm GMT+1
! Internet Support: eurosupport@usr.com
! UK Internet Support: uksupport@usr.com
! US Fax On Demand from international: (847) 676-8536
!
!
! This script should work with most of our modems using our current
! command set. This would include all of our 9600, 14400, 28800/33600, x2
! and v.90 modems. It should also work, for the most part, with any USR
! ISDN device.
!
! The script will attempt to talk to the modem at 230.4 port speed and
! if it fails, it will attempt the next lowest speed. It will continue to
! do this until it gets an OK back from the system and/or until the system
! says it's an OK speed.
!
! 'mlts' resource info for this modem:
! byte 1 == 01 -> modem HAS built in reliability protocols
! byte 2 == 01 -> modem HAS built-in data compression protocols
! byte 3 == 58 -> max hex chars in varstr 7
! byte 4 == 58 -> max hex chars in varstr 8
! byte 5 == 58 -> max hex chars in varstr 9
!
@ORIGINATE
@ANSWER
! Set up the port and test to see if the modem is responding.
@LABEL 1
serreset 57600, 0, 8, 1
hsreset 0 0 0 0 0 0
settries 0
matchclr
matchstr 1 2 "OK\13\10"
write "AT\13"
matchread 30
jump 6
!
@LABEL 2
!
matchclr
matchstr 1 3 "OK\13\10"
matchstr 2 100 "ERROR\13\10"
write "AT&F&A3&B1&H1&R2&D0&K3&M4E0V1Q0S0=0X4\13"
matchread 30
inctries
iftries 3 100
pause 2
write "+++"
pause 2
write "ATH\13"
pause 5
DTRSet
flush
jump 2
!
!
@LABEL 3
! Error Control (EC) decided by VarString 4
! If VarString 4=0, EC handled by computer (ARAP)
! If VarString 4=1, EC handled by modem (v.42/MNP2-4)
! If VarString 4=2, EC handled by modem (2 not supported)
ifstr 4 4 "1"
ifstr 4 4 "2"
matchclr
matchstr 1 5 "OK\13\10"
write "AT&M0\13"
matchread 30
jump 100
!
@LABEL 4
! Data Compression (DC) decided by VarString 5
! If VarString 5=0, DC handled by computer
! If VarString 5=1, DC handled by modem (v.42bis/MNP5)
ifstr 5 5 "1"
!
matchclr
matchstr 1 5 "OK\13\10"
write "AT&K0\13"
matchread 30
jump 100
!
@LABEL 5
! Modem Speaker decided by VarString 2
! If VarString 2=0, modem speaker off
! If VarString 2=1, modem speaker on
ifstr 2 10 "1"
pause 5
matchclr
matchstr 1 10 "OK\13\10"
write "ATM0\13"
matchread 30
jump 100
!
! Labels 6-9 are for instances where the computer or modem will not
! respond at 230.4 port speed
@LABEL 6
serreset 115200, 0, 8, 1
hsreset 0 0 0 0 0 0
settries 0
matchclr
matchstr 1 2 "OK\13\10"
write "AT\13"
matchread 30
jump 7
!
@LABEL 7
serreset 57600, 0, 8, 1
hsreset 0 0 0 0 0 0
settries 0
matchclr
matchstr 1 2 "OK\13\10"
write "AT\13"
matchread 30
jump 8
!
@LABEL 8
serreset 38400, 0, 8, 1
hsreset 0 0 0 0 0 0
settries 0
matchclr
matchstr 1 2 "OK\13\10"
write "AT\13"
matchread 30
jump 9
!
@LABEL 9
serreset 19200, 0, 8, 1
hsreset 0 0 0 0 0 0
settries 0
matchclr
matchstr 1 2 "OK\13\10"
write "AT\13"
matchread 30
jump 100
!
@LABEL 10
ifANSWER 25
!
! Dialing mode decided by VarString 6
! If VarString 6=0, normal dialing
! If VarString 6=1, blind dialing
! If VarString 6=2, manual dialing
ifstr 6 12 "1"
ifstr 6 11 "2"
jump 13
!
@LABEL 11
! Display dialog for manual dialing
ASK 2 "Pick up the phone & dial ^1. Hit OK when the phone rings, then hangup." 105
note "Manual dialing started" 3
! X3 to ignore dialtone & busy, D to dial, \^ generates data tone
write "ATX3D\^\13"
jump 25
!
@LABEL 12
note "Dialing blind" 3
matchclr
matchstr 1 13 "OK\13\10"
! X1 to ignore dialtone & busy
write "ATX1\13"
matchread 30
jump 100
!
@LABEL 13
! Display the full dialstring contained in Varstring 1
note "Dialing ^1" 3
!
! Varstrings 7, 8 and 9, contain dialstring fragments
! Long phone numbers may need to be split into smaller groups
! for the modem to use
!
! Varstring 3: "p" for pulse & "t" for tone dialing
! Varstring 8 == blank (dialstring in varstring 7)
! Varstring 9 == blank (dialstring in varstrings 7 & 8)
! Otherwise (dialstring in varstrings 7, 8 & 9)
pause 1
ifstr 8 20 " "
ifstr 9 18 " "
!
@LABEL 14
! Write dialstring in varstrings 7, 8 & 9
matchclr
matchstr 1 15 "OK\13\10"
write "ATD^3^7;\13"
matchread 400
jump 20
!
@LABEL 15
matchclr
matchstr 1 16 "OK\13\10"
write "ATD^3^8;\13"
matchread 400
jump 100
!
@LABEL 16
write "ATD^3^9\13"
jump 25
!
@LABEL 18
! Write dialstring in varstrings 7 & 8
matchclr
matchstr 1 19 "OK\13\10"
write "ATD^3^7;\13"
matchread 400
jump 20
!
@LABEL 19
write "ATD^3^8\13"
jump 25
!
@LABEL 20
! Write dialstring in varstring 7
write "ATD^3^7\13"
!
@LABEL 25
matchclr
matchstr 1 80 "RING\13\10"
matchstr 2 101 "NO DIAL TONE\13\10"
matchstr 3 102 "NO CARRIER"
matchstr 4 102 "ERROR\13\10"
matchstr 5 103 "BUSY\13\10"
matchstr 6 104 "NO ANSWER\13\10"
matchstr 7 26 "CONNECT "
matchstr 8 29 "CONNECT\13\10"
matchread 700
ifANSWER 25
jump 100
!
! Parse the speed of connect result codes
! 2400 and 4800 have two entries each
! to distinguish them from 24000 and 48000
!
@LABEL 26
matchclr
matchstr 1 29 "2400\13"
matchstr 2 29 "2400/"
matchstr 3 30 "4800\13"
matchstr 4 30 "4800/"
matchstr 5 31 "7200"
matchstr 6 32 "9600"
matchstr 7 33 "12000"
matchstr 8 34 "14400"
matchstr 9 35 "16800"
matchstr 10 36 "19200"
matchstr 11 37 "21600"
matchstr 12 38 "24000"
matchstr 13 39 "26400"
matchstr 14 40 "28000"
matchstr 15 41 "28800"
matchstr 16 42 "29333"
matchstr 17 43 "30666"
matchstr 18 44 "31200"
matchstr 19 45 "32000"
matchstr 20 46 "33333"
matchstr 21 47 "33600"
matchstr 22 48 "34666"
matchstr 23 49 "36000"
matchstr 24 50 "37333"
matchstr 25 51 "38666"
matchstr 26 52 "40000"
matchstr 27 53 "41333"
matchstr 28 54 "42666"
matchstr 29 55 "44000"
matchstr 30 56 "45333"
matchstr 31 57 "46666"
matchstr 32 58 "48000"
matchstr 1 59 "49333"
matchstr 2 60 "50666"
matchstr 3 61 "52000"
matchstr 4 62 "53333"
matchstr 5 63 "54666"
matchstr 6 64 "56000"
matchstr 7 65 "57333"
matchstr 8 66 "58666"
matchstr 9 67 "60000"
matchstr 10 68 "64000"
matchread 30
jump 69
!
! -- Connection rates --
! CommunicatingAt informs ARA of the DCE speed
!
@LABEL 29
note "Communicating at 2400 bps." 2
CommunicatingAt 2400
jump 70
!
@LABEL 30
note "Communicating at 4800 bps." 2
CommunicatingAt 4800
jump 70
!
@LABEL 31
note "Communicating at 7200 bps." 2
CommunicatingAt 7200
jump 70
!
@LABEL 32
note "Communicating at 9600 bps." 2
CommunicatingAt 9600
jump 70
!
@LABEL 33
note "Communicating at 12000 bps." 2
CommunicatingAt 12000
jump 70
!
@LABEL 34
note "Communicating at 14400 bps." 2
CommunicatingAt 14400
jump 70
!
@LABEL 35
note "Communicating at 16800 bps." 2
CommunicatingAt 16800
jump 70
!
@LABEL 36
note "Communicating at 19200 bps." 2
CommunicatingAt 19200
jump 70
!
@LABEL 37
note "Communicating at 21600 bps." 2
CommunicatingAt 21600
jump 70
!
@LABEL 38
note "Communicating at 24000 bps." 2
CommunicatingAt 24000
jump 70
!
@LABEL 39
note "Communicating at 26400 bps." 2
CommunicatingAt 26400
jump 70
!
@LABEL 40
note "Communicating at 28000 bps." 2
CommunicatingAt 28000
jump 70
!
@LABEL 41
note "Communicating at 28800 bps." 2
CommunicatingAt 28800
jump 70
!
@LABEL 42
note "Communicating at 29333 bps." 2
CommunicatingAt 29333
jump 70
!
@LABEL 43
note "Communicating at 30666 bps." 2
CommunicatingAt 30666
jump 70
!
@LABEL 44
note "Communicating at 31200 bps." 2
CommunicatingAt 31200
jump 70
!
@LABEL 45
note "Communicating at 32000 bps." 2
CommunicatingAt 32000
jump 70
!
@LABEL 46
note "Communicating at 33333 bps." 2
CommunicatingAt 33333
jump 70
!
@LABEL 47
note "Communicating at 33600 bps." 2
CommunicatingAt 33600
jump 70
!
@LABEL 48
note "Communicating at 34666 bps." 2
CommunicatingAt 34666
jump 70
!
@LABEL 49
note "Communicating at 36000 bps." 2
CommunicatingAt 36000
jump 70
!
@LABEL 50
note "Communicating at 37333 bps." 2
CommunicatingAt 37333
jump 70
!
@LABEL 51
note "Communicating at 38666 bps." 2
CommunicatingAt 38666
jump 70
!
@LABEL 52
note "Communicating at 40000 bps." 2
CommunicatingAt 40000
jump 70
!
@LABEL 53
note "Communicating at 41333 bps." 2
CommunicatingAt 41333
jump 70
!
@LABEL 54
note "Communicating at 42666 bps." 2
CommunicatingAt 42666
jump 70
!
@LABEL 55
note "Communicating at 44000 bps." 2
CommunicatingAt 44000
jump 70
!
@LABEL 56
note "Communicating at 45333 bps." 2
CommunicatingAt 45333
jump 70
!
@LABEL 57
note "Communicating at 46666 bps." 2
CommunicatingAt 46666
jump 70
!
@LABEL 58
note "Communicating at 48000 bps." 2
CommunicatingAt 48000
jump 70
!
@LABEL 59
note "Communicating at 49333 bps." 2
CommunicatingAt 49333
jump 70
!
@LABEL 60
note "Communicating at 50666 bps." 2
CommunicatingAt 50666
jump 70
!
@LABEL 61
note "Communicating at 52000 bps." 2
CommunicatingAt 52000
jump 70
!
@LABEL 62
note "Communicating at 53333 bps." 2
CommunicatingAt 53333
jump 70
!
@LABEL 63
note "Communicating at 54666 bps." 2
CommunicatingAt 54666
jump 70
!
@LABEL 64
note "Communicating at 56000 bps." 2
CommunicatingAt 56000
jump 70
!
@LABEL 65
note "Communicating at 57333 bps." 2
CommunicatingAt 57333
jump 70
!
@LABEL 66
note "Communicating at 58666 bps." 2
CommunicatingAt 58666
jump 70
!
@LABEL 67
note "Communicating at 60000 bps." 2
CommunicatingAt 60000
jump 70
!
@LABEL 68
note "Communicating at 64000 bps." 2
CommunicatingAt 64000
jump 70
!
@LABEL 69
note "Communicating at an unknown rate." 2
jump 70
!
!
! Look for error control and data compression results
! at the end of the connect result.
!
@LABEL 70
matchclr
matchstr 1 71 "LAPM"
matchstr 2 71 "ARQ"
matchstr 3 72 "V42BIS"
matchstr 4 71 "MNP\13"
matchstr 5 72 "MNP5"
matchstr 6 75 "\10"
matchread 30
jump 75
!
! -- Modem error control link negotiation --
! Userhook 2 informs ARA that the modem has established error control
!
@LABEL 71
note "Modem Error Control Established." 2
userhook 2
jump 70
!
! -- Compression negotiation --
! Userhook 3 informs ARA that the modem has established data compression
!
@LABEL 72
note "Modem Data Compression Established." 2
userhook 3
jump 70
!
! -- Normal exit after "CONNECT" --
!
! This modem has been setup to do RTS/CTS handshaking,
! and we assume that the proper cable is being used.
!
@LABEL 75
! Turn on RTS/CTS handshaking.
HSReset 0 1 0 0 0 1
!
ifANSWER 76
pause 30
@LABEL 76
exit 0
!
! A RING result from the modem and in ANSWERING mode
! claims the serial port and answering the phone
!
@LABEL 80
ifORIGINATE 25
userhook 1
note "Answering phone..." 2
write "ATA\13"
jump 25
!
! ---- Hang up and reset modem ----
!
@HANGUP
@LABEL 90
settries 0
HSReset 0 0 0 0 0 0
!
@LABEL 91
! Escape from data to command mode
matchclr
matchstr 1 92 "OK\13\10"
matchstr 2 92 "NO CARRIER\13\10"
write "AT\13"
matchread 50
pause 1
write "+++"
pause 1
matchread 100
!
@LABEL 92
! Force a hangup
matchclr
matchstr 1 94 "NO CARRIER\13\10"
matchstr 2 94 "OK\13\10"
matchstr 3 94 "ERROR\13\10"
write "ATH\13"
matchread 100
!
! Try to get control of the modem by toggling DTR
DTRClear
pause 2
DTRSet
flush
!
! Try the hangup sequence three times otherwise declare and error
inctries
iftries 3 93
jump 91
!
@LABEL 93
! Error message if modem will not hang up
pause 1
NOTE "Modem is not hanging up properly. Please turn the modem off and back on." 3
jump 100
!
@LABEL 94
! Recall the factory settings
pause 15
matchclr
matchstr 1 95 "OK\13\10"
write "AT&F&A3&B1&H1&R2&D0&K3&M4E0S0=0X4\13"
matchread 30
jump 100
!
@LABEL 95
exit 0
!
! ---- Error messages -----
!
! Modem Not Responding
@LABEL 100
exit -6019
!
! No Dial Tone
@LABEL 101
exit -6020
!
! No Carrier or Error
@LABEL 102
exit -6021
!
! Busy
@LABEL 103
exit -6022
!
! No Answer
@LABEL 104
exit -6023
!
! User Cancellation
@LABEL 105
exit -6008
!
!The End